<template>
  <div>
    <CustomizeTitlebar></CustomizeTitlebar>
    <div style="margin-top: 20px">
      <n-button @click="postTest">测试POST</n-button>
    </div>
    {{ text }}
  </div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import CustomizeTitlebar from '@comp/CustomizeTitlebar.vue'
import { postAction } from '@/api/manage';

const text = ref('')

const postTest = () => {
  let url = `/sys/login`
  postAction(url, {
    username: 'admin',
    password: 'tick20140513'
  }).then((res: any) => {
    text.value = res.token
  })
}
</script>
<style scoped></style>
